jQuery(function ($) {
    jQuery('#name-form').yiiActiveForm([{
        "id": "nameform-name",
        "name": "name",
        "container": ".field-nameform-name",
        "input": "#nameform-name",
        "error": ".help-block.help-block-error",
        "validate": function (attribute, value, messages, deferred, $form) {
            yii.validation.required(value, messages, {
                "message": "name 123 cannot be blank."
            });
        }
    }, {
        "id": "nameform-email",
        "name": "email",
        "container": ".field-nameform-email",
        "input": "#nameform-email",
        "error": ".help-block.help-block-error",
        "validate": function (attribute, value, messages, deferred, $form) {
            yii.validation.required(value, messages, {
                "message": "Email cannot be blank."
            });
        }
    }], []);
});